package org.liaohailong.victorlibrary.model

import org.liaohailong.library.db.annotation.Column
import org.liaohailong.library.db.annotation.Table

/**
 * Author: liaohailong
 * Date: 2019/4/4
 * Time: 6:35 PM
 * Description: 测试数据：学生
 **/
@Table(name = "student")
class Student {

    @Column(name = "id", primaryKey = true)
    var id: Int = -1

    @Column(name = "name", notNull = true, default = "无名氏")
    var name: String = ""

    @Column(name = "number", notNull = true, default = "0")
    var number: Int = 0

    @Column(name = "age", notNull = true, default = "0")
    var age: Int = -1

    @Column(name = "sex", notNull = true, default = "0")
    var sex: Int = -1 //0女 1男

    override fun toString(): String {
        return "Student(id=$id, name='$name', number=$number, age=$age, sex=$sex)"
    }
}